cc.Class({
    extends: cc.Component,

    properties: {
        show_buyAll: cc.SpriteAtlas,
        goods_sp: cc.Sprite,
        goods_dsc: cc.Label,
        btn_icon: cc.Sprite,
        btn_num: cc.Label,
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start() {

    },
    init(data) {
        this.goods_sp.getComponent(cc.Sprite).spriteFrame=this.show_buyAll.getSpriteFrame(data.goods_sp);
        this.btn_icon.getComponent(cc.Sprite).spriteFrame=this.show_buyAll.getSpriteFrame(data.btn_icon);
        this.goods_dsc.string=data.goods_dsc;
        this.btn_num.string=data.btn_num;
    },
    selectbtn(evt) {
        let _name = evt.currentTarget.name;
        switch (_name) {
            case "cancel":
                this.node.active = false;
                break;
            case "btnbg":
                this.node.active = false;
                break;
        }
    },

    // update (dt) {},
});
